[mirrors]
http://wiki.qemu-project.org/download/qemu-1.3.0.tar.bz2

[vars]
filesize=10286423
sha512=2b314590363697140c3f7b3c445a40782f34c3d8911ded66e15ddd4470c7f38d0035fa09b6e6d99122f209495b62111809ce2eb4fc308fc120b9c598d18c2bc7

[deps]
glib
sdl
libx11

[build]

# WARNING this package needs more than 512 MB ram to build

patch -p1 < "$K"/qemu-syscall.patch
patch -p1 < "$K"/qemu-mmap.patch
patch -p1 < "$K"/qemu-arm-user-exec.patch

CFLAGS="-D_GNU_SOURCE -Dflock64=flock -D__SIGRTMIN=32 -D__SIGRTMAX=\(NSIG-1\)"
CFLAGS="$CFLAGS -DF_SETLKW64=F_SETLKW -DF_GETLK64=F_GETLK -DF_SETLK64=F_SETLK"
CFLAGS="$CFLAGS -O2 -g0" \
./configure --prefix="$butch_prefix" \
  --enable-kvm \
  --disable-werror \
  --disable-vnc \
  --disable-bluez \
  --enable-sdl

make -j$MAKE_THREADS V=1
make DESTDIR="$butch_install_dir" install
